import { createRouter, createWebHistory } from 'vue-router'

const routes = [
    {
        path: '/moveshow',
        name: 'moveshow',
        component: () => import("@/views/MoveShow.vue"),
        // useFrame ： false 用来判断是全屏页面
        meta: { title: "移动端", show: false, icon:"shop-o",useFrame:false }
    },
    {
        path: '/movecategory',
        name: 'movecategory',
        component: () => import("@/views/MoveCategory.vue"),
        // useFrame ： false 用来判断是全屏页面
        meta: { title: "类目", show: false, icon: "shop-o", useFrame: false }
    },
    {
        path: '/moveproduct',
        name: 'moveproduct',
        component: () => import("@/views/MoveProductList.vue"),
        // useFrame ： false 用来判断是全屏页面
        meta: { title: "商品列表", show: false, icon: "shop-o", useFrame: false }
    },
    {
        path: '/moveproductxq',
        name: 'moveproductxq',
        component: () => import("@/views/MoveProductXQ.vue"),
        // useFrame ： false 用来判断是全屏页面
        meta: { title: "商品详情", show: false, icon: "shop-o", useFrame: false }
    },
    {
        path: '/',
        name: 'home',
        component: () => import("@/views/Home.vue"),
        meta: { title: "首页", show: true, icon: "House"}
    },
    {
        path: '/category',
        component: () => import("@/views/category/Index.vue"),
        meta: { title: "类目管理", show: true, icon: "Files" },
        children: [
            {
                path: "/category/add",
                name: "category-add",
                component: () => import("@/views/category/Add.vue"),
                meta: { title: "类目添加", show: true, icon: "plus" }
            },
            {
              
                path: "/category/edit",
                name: "category-edit",
                component: () => import("@/views/category/Edit.vue"),
                meta: { title: "类目修改", show: false ,icon: "EditPen" }
            
            },
            {

                path: "/category/list",
                name: "category-list",
                component: () => import("@/views/category/List.vue"),
                meta: { title: "类目列表", show: true, icon: "List" }

            }
        ]
    },
    {
        path: '/product',
        component: () => import("@/views/product/Index.vue"),
        meta: { title: "商品管理", show: true, icon: "Shop" },
        children: [
            {
                path: "/product/add",
                name: "product-add",
                component: () => import("@/views/product/Add.vue"),
                meta: { title: "商品添加", show: true, icon: "plus" }
            },
            {

                path: "/product/edit",
                name: "product-edit",
                component: () => import("@/views/product/Edit.vue"),
                meta: { title: "商品修改", show: false, icon: "EditPen" }

            },
            {

                path: "/product/list",
                name: "product-list",
                component: () => import("@/views/product/List.vue"),
                meta: { title: "商品列表", show: true, icon: "List" }

            }
        ]
    }

]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router